#ifndef NETWORK_H
#define NETWORK_H

#include "messages.h"
#include "RakPeer.h"
#define MAX_CLIENTS 8
#define SERVER_PORT 1337

class Network
{
    private:
        unsigned char packetIdentifier;
        RakNet::Packet *packet;
        unsigned char GetPacketIdentifier(RakNet::Packet *p);
        RakNet::RakPeerInterface *server;

    public:
        Network();
        ~Network();

        void receive_data();
        void shutdown();
        void broadcast_message(const RakNet::BitStream *bitStream, PacketPriority priority, PacketReliability reliability);
        void send_message(const RakNet::BitStream *bitStream, PacketPriority priority, PacketReliability reliability, RakNet::SystemAddress address);
};

#endif // NETWORK_H
